package com.xinchuang.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.PictureData;

/**
 * <p>
 * 选模表明细表
 * </p>
 *
 * @author baomidou
 * @since 2023-11-01
 */
@TableName("t_mold_selection_detail")
@ApiModel(value = "MoldSelectionDetail对象", description = "选模表明细表")
public class MoldSelectionDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @ExcelProperty({"序\n" +
            "号"})
    private String id;

    @ApiModelProperty("选模表Id")
    private String moldSelectionId;

    @ApiModelProperty("产品名称")
    @ExcelProperty({"零件名称"})
    private String productName;

    @ApiModelProperty("产品编号")
    @ExcelProperty({"零件代号"})
    private String productCode;

    @ApiModelProperty("产品图片")
    @ExcelIgnore
    private String productImage;

    //图片数据临时变量
    @ExcelIgnore
    @TableField(exist = false)
    private PictureData pictureData;

    @ApiModelProperty("产品尺寸")
    @ExcelProperty({"产品尺寸"})
    private String productSize;

    @ApiModelProperty("长")
    private String productLength;

    @ApiModelProperty("宽")
    private String productWidth;

    @ApiModelProperty("高")
    private String productHeight;

    @ApiModelProperty("材料信息")
    @ExcelProperty({"材料信息"})
    private String material;

    @ApiModelProperty("外观要求")
    @ExcelProperty({"外观要求"})
    private String surface;

    @ApiModelProperty("模具编号")
    @ExcelProperty({"模具编号"})
    private String moldId;

    @ApiModelProperty("型腔材质")
    @ExcelIgnore
    private String cavity;

    @ApiModelProperty("型芯材质")
    @ExcelIgnore
    private String core;

    @ApiModelProperty("型腔/型芯材质")
    @ExcelProperty({"型腔/\n" +
            "型芯材质"})
    @TableField(exist = false)
    private String cavityCore;

    @ApiModelProperty("每模腔数")
    @ExcelProperty({"每模\n" +
            "腔数"})
    private String cavityNum;

    @ApiModelProperty("模具寿命（万模）")
    @ExcelProperty({"模具  \n" +
            "寿命（万模）"})
    private String longevity;

    @ApiModelProperty("浇注系统")
    @ExcelProperty({"浇注\n" +
            "系统"})
    private String pour;

    @ApiModelProperty("产品是否换色")
    @ExcelProperty({"产品是否换色"})
    private String changeColor;

    @ApiModelProperty("机台大小")
    @ExcelProperty({"机台大小"})
    private String machineSize;

    @ApiModelProperty("成型周期S")
    @ExcelProperty({"成型  \n" +
            "周期S"})
    private String moldingCycle;

    @ApiModelProperty("取件方式")
    @ExcelProperty({"取件方式"})
    private String pickUpWay;

    @ApiModelProperty("顶出/复位方式")
    @ExcelProperty({"顶出/复位方式"})
    private String ejectionOrresetMode;

    @ApiModelProperty("T0时间")
    @ExcelProperty({"T0时间"})
    private String t0Time;

    @ApiModelProperty("模具尺寸（预估）")
    @ExcelProperty({"模具尺寸（预估）"})
    private String moldSize;

    @ApiModelProperty("模具尺寸长（预估）")
    private String moldLength;

    @ApiModelProperty("模具尺寸宽（预估）")
    private String moldWidth;

    @ApiModelProperty("模具尺寸高（预估）")
    private String moldHeight;

    @ApiModelProperty("模具重量T")
    @ExcelProperty({"模具  \n" +
            "重量T"})
    private String moldWeight;

    @ApiModelProperty("模具类型")
    @ExcelProperty({"模具\n" +
            "类型"})
    private String moldType;

    @ApiModelProperty("是否承制")
    @ExcelProperty({"是否承制"})
    private String isSupply;

    @ApiModelProperty("备用参数1")
    private String param1;

    @ApiModelProperty("备用参数2")
    private String param2;

    @ApiModelProperty("备用参数3")
    private String param3;

    @ApiModelProperty("备用参数4")
    private String param4;

    @ApiModelProperty("备用参数5")
    private String param5;

    @ApiModelProperty("备用参数6")
    private String param6;

    @ApiModelProperty("备用参数7")
    private String param7;

    @ApiModelProperty("备用参数8")
    private String param8;

    @ApiModelProperty("备用参数9")
    private String param9;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMoldSelectionId() {
        return moldSelectionId;
    }

    public void setMoldSelectionId(String moldSelectionId) {
        this.moldSelectionId = moldSelectionId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getProductImage() {
        return productImage;
    }

    public void setProductImage(String productImage) {
        this.productImage = productImage;
    }

    public String getProductSize() {
        return productSize;
    }

    public void setProductSize(String productSize) {
        if (StringUtils.isNotBlank(productSize)) {
            String[] arr1 = productSize.split("t");
            String trim = arr1[0].trim().replaceAll("[*Xx×]", "*");
            String[] arr = trim.split("\\*");
            this.productLength = arr[0];
            this.productWidth = arr[1];
            this.productHeight = arr[2];
            this.productSize = trim;
        } else {
            this.productSize = "";
        }
    }

    public String getProductLength() {
        return productLength;
    }

    public void setProductLength(String productLength) {
        this.productLength = productLength;
    }

    public String getProductWidth() {
        return productWidth;
    }

    public void setProductWidth(String productWidth) {
        this.productWidth = productWidth;
    }

    public String getProductHeight() {
        return productHeight;
    }

    public void setProductHeight(String productHeight) {
        this.productHeight = productHeight;
    }

    public String getMaterial() {
        return material;
    }

    public void setMaterial(String material) {
        this.material = material;
    }

    public String getSurface() {
        return surface;
    }

    public void setSurface(String surface) {
        this.surface = surface;
    }

    public String getMoldId() {
        return moldId;
    }

    public void setMoldId(String moldId) {
        this.moldId = moldId;
    }

    public String getCavity() {
        return cavity;
    }

    public void setCavity(String cavity) {
        this.cavity = cavity;
    }

    public String getCore() {
        return core;
    }

    public void setCore(String core) {
        this.core = core;
    }

    public String getCavityCore() {
        return cavityCore;
    }

    public void setCavityCore(String cavityCore) {
        String[] arr = cavityCore.split("/");
        if (arr.length == 1) {
            this.cavity = arr[0];
            this.core = arr[0];
        } else if (arr.length == 2) {
            this.cavity = arr[0];
            this.core = arr[1];
        }
        this.cavityCore = cavityCore;
    }

    public String getCavityNum() {
        return cavityNum;
    }

    public void setCavityNum(String cavityNum) {
        this.cavityNum = cavityNum;
    }

    public String getLongevity() {
        return longevity;
    }

    public void setLongevity(String longevity) {
        this.longevity = longevity;
    }

    public String getPour() {
        return pour;
    }

    public void setPour(String pour) {
        this.pour = pour;
    }

    public String getChangeColor() {
        return changeColor;
    }

    public void setChangeColor(String changeColor) {
        this.changeColor = changeColor;
    }

    public String getMachineSize() {
        return machineSize;
    }

    public void setMachineSize(String machineSize) {
        this.machineSize = machineSize;
    }

    public String getMoldingCycle() {
        return moldingCycle;
    }

    public void setMoldingCycle(String moldingCycle) {
        this.moldingCycle = moldingCycle;
    }

    public String getPickUpWay() {
        return pickUpWay;
    }

    public void setPickUpWay(String pickUpWay) {
        this.pickUpWay = pickUpWay;
    }

    public String getEjectionOrresetMode() {
        return ejectionOrresetMode;
    }

    public void setEjectionOrresetMode(String ejectionOrresetMode) {
        this.ejectionOrresetMode = ejectionOrresetMode;
    }

    public String getT0Time() {
        return t0Time;
    }

    public void setT0Time(String t0Time) {
        this.t0Time = t0Time;
    }

    public String getMoldSize() {
        return moldSize;
    }

    public void setMoldSize(String moldSize) {
        if (StringUtils.isNotBlank(moldSize)) {
            if (moldSize.equals("/")) {
                moldSize = "";
            } else {
                moldSize = moldSize.trim().replaceAll("[*Xx×]", "*");
                String[] arr = moldSize.split("\\*");
                this.moldLength = arr[0];
                this.moldWidth = arr[1];
                this.moldHeight = arr[2];
            }
        }
        this.moldSize = moldSize;
    }

    public String getMoldLength() {
        return moldLength;
    }

    public void setMoldLength(String moldLength) {
        this.moldLength = moldLength;
    }

    public String getMoldWidth() {
        return moldWidth;
    }

    public void setMoldWidth(String moldWidth) {
        this.moldWidth = moldWidth;
    }

    public String getMoldHeight() {
        return moldHeight;
    }

    public void setMoldHeight(String moldHeight) {
        this.moldHeight = moldHeight;
    }

    public String getMoldWeight() {
        return moldWeight;
    }

    public void setMoldWeight(String moldWeight) {
        if (StringUtils.isNotBlank(moldWeight) && moldWeight.equals("/")) {
            moldWeight = "";
        }
        this.moldWeight = moldWeight;
    }

    public String getMoldType() {
        return moldType;
    }

    public void setMoldType(String moldType) {
        if (StringUtils.isNotBlank(moldType) && moldType.equals("/")) {
            moldType = "";
        }
        this.moldType = moldType;
    }

    public String getIsSupply() {
        return isSupply;
    }

    public void setIsSupply(String isSupply) {
        this.isSupply = isSupply;
    }

    public String getParam1() {
        return param1;
    }

    public void setParam1(String param1) {
        this.param1 = param1;
    }

    public String getParam2() {
        return param2;
    }

    public void setParam2(String param2) {
        this.param2 = param2;
    }

    public String getParam3() {
        return param3;
    }

    public void setParam3(String param3) {
        this.param3 = param3;
    }

    public String getParam4() {
        return param4;
    }

    public void setParam4(String param4) {
        this.param4 = param4;
    }

    public String getParam5() {
        return param5;
    }

    public void setParam5(String param5) {
        this.param5 = param5;
    }

    public String getParam6() {
        return param6;
    }

    public void setParam6(String param6) {
        this.param6 = param6;
    }

    public String getParam7() {
        return param7;
    }

    public void setParam7(String param7) {
        this.param7 = param7;
    }

    public String getParam8() {
        return param8;
    }

    public void setParam8(String param8) {
        this.param8 = param8;
    }

    public String getParam9() {
        return param9;
    }

    public void setParam9(String param9) {
        this.param9 = param9;
    }

    @Override
    public String toString() {
        return "MoldSelectionDetail{" +
            "id = " + id +
            ", moldSelectionId = " + moldSelectionId +
            ", productName = " + productName +
            ", productCode = " + productCode +
            ", productImage = " + productImage +
            ", productSize = " + productSize +
            ", productLength = " + productLength +
            ", productWidth = " + productWidth +
            ", productHeight = " + productHeight +
            ", material = " + material +
            ", surface = " + surface +
            ", moldId = " + moldId +
            ", cavity = " + cavity +
            ", core = " + core +
            ", cavityNum = " + cavityNum +
            ", longevity = " + longevity +
            ", pour = " + pour +
            ", changeColor = " + changeColor +
            ", machineSize = " + machineSize +
            ", moldingCycle = " + moldingCycle +
            ", pickUpWay = " + pickUpWay +
            ", ejectionOrresetMode = " + ejectionOrresetMode +
            ", t0Time = " + t0Time +
            ", moldSize = " + moldSize +
            ", moldLength = " + moldLength +
            ", moldWidth = " + moldWidth +
            ", moldHeight = " + moldHeight +
            ", moldWeight = " + moldWeight +
            ", moldType = " + moldType +
            ", isSupply = " + isSupply +
            ", param1 = " + param1 +
            ", param2 = " + param2 +
            ", param3 = " + param3 +
            ", param4 = " + param4 +
            ", param5 = " + param5 +
            ", param6 = " + param6 +
            ", param7 = " + param7 +
            ", param8 = " + param8 +
            ", param9 = " + param9 +
        "}";
    }
}
